Skip to content

Conversation

ayushb
Copy link
Member

@ayushb ayushb commented Sep 17, 2026

Solves #28, #30 and #31.

Filtered next/prev now looks up the members of a type in one request instead of walking every id until one matches. Also deletes the unused index.css and records the node/npm versions in engines and .nvmrc.

* Nothing imported it, so none of it was running
* Its selectors and variables are vite template leftovers that no
  component references
* Its #root block also contradicted the layout rules in App.css

References #30
* Add an engines field so npm warns on an unsupported version
* Add .nvmrc so nvm picks the right node automatically
* Versions match what the assignment asks for, node 24.6 and npm 11

References #31
* Add getPokemonIdsByType, which returns every member of a type in one
  request
* Walk only those ids when a type rule is set, so filling the list stops
  fetching every pokemon in between
* Merge the ids when several types are picked, matching how matchesFilter
  keeps a pokemon that has any of them
* Hold on to the id list per type, the members do not change while the
  page is open
* Fall back to the old walk when no type rule is set
* Add tests for the lookup and for the ids it does not fetch

References #28
* Add cases for id 0 and id 1, the boundary #32 moved
* Nothing covered id 0 before, so the fix it made was untested

References #29
@ayushb ayushb requested a review from a team as a code owner September 17, 2026 22:55
Copy link
Member

@thomhet thomhet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ayushb ayushb merged commit 5b02d49 into main Sep 17, 2026
@thomhet thomhet deleted the feat/issues-28-30-31 branch September 18, 2026 22:58
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants